package com.chenfan.magic.constant;

/**
 * 授权校验常量
 *
 * @author troy
 */
public interface SecureConstant {

    /**
     * 认证请求头
     */
    String BASIC_HEADER_KEY = "Authorization";

    /**
     * 认证请求头前缀
     */
    String BASIC_HEADER_PREFIX = "Basic ";

    /**
     * 认证请求头前缀
     */
    String BASIC_HEADER_PREFIX_EXT = "Basic%20";

    /**
     * idc_isv表字段
     */
    String CLIENT_FIELDS = "app_key, app_secret, access_token_validity, refresh_token_validity";

    /**
     * idc_isv查询语句
     */
    String BASE_STATEMENT = "select " + CLIENT_FIELDS + " from idc_isv";

    /**
     * idc_isv查询排序
     */
    String DEFAULT_FIND_STATEMENT = BASE_STATEMENT + " order by app_key";

    /**
     * 查询client_id
     */
    String DEFAULT_SELECT_STATEMENT = BASE_STATEMENT + " where app_key = ?";

    /**
     * idc_isv_user查询语句
     */
    String SELECT_ISV_USER_STATEMENT = "select * from idc_isv_user where app_key = ? and user_id = ?";


}
